PP-528: Unused Extruder Influences Settings #19666
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ever since the dawn of
timeCura, having a material in Extruder 2 active influences the settings in Extruder 1. This is a necessary compromise for multi-material printing. However, in Cura, this is also when you only use the material in Extruder 1.For example, PLA needs a buildplate temperature of 60°C on S-line, while ABS needs 80°C. Because there is only 1 bed to set the temperature of, the highest of the two is used to make sure the object sticks well to the bed. This, however, results in the PLA being quite droopy because it stays quite soft at that temperature - a compromise needed when printing the two materials together.
If, however, you only use the PLA in Extruder 1, you have to remember to manually disable Extruder 2, as otherwise the PLA uses a bed temperature of 80°C for no good reason.
This problem also applies to various other settings that cannot be set per extruder, like the Build Volume Temperature, Adhesion Type, Materials Shrinkage Compensation, Support Structure, …
See also PP-528, CURA-3499, CURA-3151, CURA-7226, CURA-9233
Solution
Turns out, Cura already has a function
ExtruderManager.getUsedExtruderStacks()
, which goes over a bunch of settings to check which extruders are actually used, not just the enabled ones. For example, it checks:support_..._extruder_nr
if support is enabledskirt_brim_extruder_nr
ifadhesion_type
isskirt
orbrim
raft_..._extruder_nr
ifadhesion_type
israft
The result of this function is now saved in new setting (
extruder_used
). This setting lives in the machine section, so is not settable by the user and is driven by Cura.The function
extruderValues
that is available inSettingFunction
s then only gives the values of the actually used extruders. If there are no used extruders (yet), like when there is no mesh loaded, it falls back to the old behaviour of using all the enabled extruders.Type of change
How Has This Been Tested?
Test Configuration:
Checklist: